Running emacs in GNU Screen overrides .emacs settings for [home] key binding in FreeBSD 8.2
Posted
by
javanix
on Super User
See other posts from Super User
or by javanix
Published on 2011-06-21T14:53:56Z
Indexed on
2011/06/21
16:25 UTC
Read the original article
Hit count: 659
If I use the following .emacs file, I am able to go to the beginning/end of the current line using the home/end keys as I would expect.
(keyboard-translate ?\C-h ?\C-?)
(add-to-list 'load-path "/home/sam/programs/go/go/misc/emacs/" t)
(require 'go-mode-load)
(global-set-key [kp-home] 'beginning-of-line) ; [Home]
(global-set-key [home] 'beginning-of-line) ; [Home]
(global-set-key [kp-end] 'end-of-line) ; [End]
(global-set-key [end] 'end-of-line) ; [End]
However, if I open up a screen session it does not function like this (the [home] key still brings me to the beginning of the buffer for some reason).
Here is my .screenrc file if anyone can spot anything funky in there:
term xterm
defutf8 on
defflow off
startup_message off
# terminfo and termcap for nice 256 color terminal
# allow bold colors - necessary for some reason
attrcolor b ".I"
# tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
#use bash as the default login shell
defshell -bash
© Super User or respective owner